package com.ruoyi.project.system.netty.controller;


import com.github.unclecatmyself.auto.ConfigFactory;
import com.github.unclecatmyself.auto.InitServer;
import com.ruoyi.project.system.netty.FromServerServiceImpl;
import com.ruoyi.project.system.netty.MyInit;
import com.ruoyi.project.system.netty.UserListenAsynData;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by MySelf on 2019/8/23.
 */
@RestController
public class Netty {

    @GetMapping("/init")
    public String init(){
        ConfigFactory.initNetty = new MyInit();
        ConfigFactory.fromServerService = FromServerServiceImpl.TYPE2;
        ConfigFactory.listenAsynData = new UserListenAsynData();
        InitServer.open();
        return "success";
    }

}
